package com.vic.small.controller;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.vic.framework.annotation.Action;
import com.vic.framework.annotation.Controller;
import com.vic.framework.bean.Data;
import com.vic.framework.bean.Handle;
import com.vic.framework.bean.Param;
import com.vic.framework.bean.Request;
import com.vic.framework.helper.ClassHelper;
import com.vic.framework.helper.Controllerhelper;
import com.vic.framework.utils.JsonUtil;

@Controller
public class TestController {

	@Action("get:/test1")
	public Data testJson(){
		Data d = new Data();
		@SuppressWarnings("serial")
		Map<String, Object> map = new HashMap<String, Object>(){{
			put("a",123);
			put("b",true);
			put("c","abcdef");
			
			};
		};
		d.setModel(map);
		return d;
	}
	
	
	@Action("post:/test2")
	public Data test2(Param param){
		System.out.println("test2**************************");
		return new Data().setModel(param.toString());
	}
		
	
}
